#!/bin/sh

if [ -n "$1" ] && [ -n "$2" ]
then
	echo "sh get params $1 $2"
	cd mjpeg_test/
	export LD_LIBRARY_PATH="$(pwd)"
	./mjpg_streamer -i "./input_uvc.so -d $1 -r 640x480 -f 25 -yuv" -o "./output_http.so -p $2 -w ./www" &
	if [ $? -eq 0 ]
	then
		echo "sh init camera $1 $2 success"
	else
		echo "sh init camera $1 $2 failed"
		exit 1
	fi
else
    echo "sh get null params"
	exit 1
fi
